/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-27
 * Time: 23:29
 */
/**
 * 鱼类：继承Animal，实现Swimmable接口
 * - 获得游泳能力
 */
class Fish extends Animal implements Swimmable {
    public Fish(String name) {
        super(name);
    }

    @Override
    public void swim() {
        System.out.println(getName() + "在水中游！");
    }
    @Override
    public void eat() {
        System.out.println("吃鱼粮");
    }
}
